package cn.wen.search.controller;import cn.wen.search.service.MallSearchService;import cn.wen.search.vo.SearchParam;import cn.wen.search.vo.SearchResult;import lombok.extern.slf4j.Slf4j;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Controller;import org.springframework.ui.Model;import org.springframework.web.bind.annotation.GetMapping;@Slf4j@Controllerpublic class SearchController {    @Autowired    private MallSearchService mallSearchService;    @GetMapping("/list.html")    public String listPage(SearchParam param, Model model){        // 1、根据传输过来的数据去es 返回数据到model中        SearchResult result = mallSearchService.search(param);        log.debug("查询结果为：{}",result);        for (SearchResult.AttrVo attr : result.getAttrs()) {            System.out.println(attr);        }        model.addAttribute("result",result);        return "list";    }}